package com.woniuxy.store.client;

import com.woniuxy.store.client.param.foodParam.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.cloud.openfeign.SpringQueryMap;
import org.springframework.web.bind.annotation.*;
import result.Result;
import java.math.BigDecimal;


@FeignClient(contextId = "foodSkuClient",name = "store",path="/store/food")
public interface FoodSkuClient {
    @PostMapping({"/insertFoodSku"})
    Result insertFoodSku(@RequestBody InsertFoodSkuParams param);

    @PutMapping({"/updateFoodSkuStateByIds"})
    Result updateFoodSkuStateByIds(@RequestParam("ids") Integer[] ids, @RequestParam("skuState") String skuState);

    @PutMapping({"/updateFoodSku"})
    Result updateFoodSku(@RequestBody UpdateFoodSkuParams param);

    @PutMapping({"/updateFoodSkuSalesCount"})
    Result updateFoodSkuSalesCount(@RequestParam("skuId") Integer skuId, @RequestParam("salesCount") Long salesCount);

    @PutMapping({"/updateFoodSkuDiscountPrice"})
    Result updateFoodSkuDiscountPrice(@RequestParam("skuId") Integer skuId, @RequestParam("discountPrice") BigDecimal discountPrice);

    @DeleteMapping({"/deleteFoodSkuByIds"})
    Result deleteFoodSkuByIds(@RequestParam("ids") Integer[] ids);

    @GetMapping({"/searchFoodSkuByCondition"})
    Result searchFoodSkuByCondition(@SpringQueryMap SearchFoodSkuByConditionParams param);

    @GetMapping({"/searchFoodSkuByQQC"})
    Result searchFoodSkuByQQC(@RequestParam("ids") Integer[] ids);

    @GetMapping({"/searchFoodSkuById"})
    Result searchFoodSkuById(@RequestParam("skuId") Integer skuId);

    @PostMapping({"/insertFoodSkuPic"})
    Result insertFoodSkuPic(@RequestParam("skuId") Integer skuId, @RequestParam("ids") Integer[] ids);

    @GetMapping({"/searchFoodSkuPic"})
    Result searchFoodSkuPic(@RequestParam("skuId") Integer skuId);

}
